﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using SmallTune.Models;

namespace SmallTune.Mappings
{
    public class PlaylistMap : ClassMap<Playlist>
    {
        public PlaylistMap()
        {
            Id(x => x.id);
            Map(x => x.name);
            HasManyToMany(x => x.listOfSongs)
                .Cascade.All()
                .Table("PlaylistsSongs");
        }
    }
}
